package com.milepost.workflow.flowinstform.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.milepost.workflow.flowinstform.entity.FlowInstFormEntity;
import com.milepost.workflow.flowinstform.mapper.FlowInstFormMapper;
import com.milepost.workflow.flowinstform.service.FlowInstFormService;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author huarf
 * @Description
 * @create 2022-03-29 2:33
 */
@Service
@RequiredArgsConstructor
@Transactional(rollbackFor = Exception.class)
public class FlowInstFormServiceImpl extends ServiceImpl<FlowInstFormMapper, FlowInstFormEntity> implements FlowInstFormService {

    @Override
    public FlowInstFormEntity getByFlowInstId(String flowInstId) {

        FlowInstFormEntity flowInstFormEntity = baseMapper.selectOne(new QueryWrapper<FlowInstFormEntity>().lambda().eq(FlowInstFormEntity::getFlowInstId, flowInstId));

        return flowInstFormEntity;
    }

}
